package com.example.demo.service.impl;

import com.example.demo.mapper.RuleMapper;
import com.example.demo.pojo.Rule;
import com.example.demo.service.RuleService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class RuleServiceImpl implements RuleService {

    @Resource
    private RuleMapper ruleMapper;

    @Override
    public void saveRule(Rule rule) {
        ruleMapper.saveRule(rule);

    }

    @Override
    public void deleteRule(Integer ruleId) {
        ruleMapper.deleteRule(ruleId);
    }

    @Override
    public void updateRule(Rule rule) {
        ruleMapper.updateRule(rule);
    }

    @Override
    public List<Rule> getAllRules() {
        return ruleMapper.getAllRules();
    }
}